﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Route.cs" company="Data Ductus Malmö">
//   (c) 2010 - 2012 Data Ductus Malmö AB
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace DataDuctus.Snmp.Persistor.Core.Tests.TestData
{
  using System.ComponentModel;
  using System.Net;

  using DataDuctus.Snmp.Persistor.Core.Attributes;

  using Lextm.SharpSnmpLib;

  /// <summary>
  /// The route.
  /// </summary>
  [Entity(BaseOid = "1.3.6.1.2.1.4.21.1", Description = "This class encapsulates the ipRouteTable")]
  public class Route
  {
    #region Public Properties

    /// <summary>
    /// Gets or sets the age.
    /// </summary>
    [Property(SubOid = 10, Access = PropertyAccess.ReadWrite)]
    [DefaultValue(7763)]
    public int Age { get; set; }

    /// <summary>
    /// Gets or sets the alternative metric 1.
    /// </summary>
    [Property(SubOid = 4, Access = PropertyAccess.ReadWrite)]
    [DefaultValue(-1)]
    public int AlternativeMetric1 { get; set; }

    /// <summary>
    /// Gets or sets the alternative metric 2.
    /// </summary>
    [Property(SubOid = 5, Access = PropertyAccess.ReadWrite)]
    [DefaultValue(-1)]
    public int AlternativeMetric2 { get; set; }

    /// <summary>
    /// Gets or sets the alternative metric 3.
    /// </summary>
    [Property(SubOid = 6, Access = PropertyAccess.ReadWrite)]
    [DefaultValue(-1)]
    public int AlternativeMetric3 { get; set; }

    /// <summary>
    /// Gets or sets the alternative metric 4.
    /// </summary>
    [Property(SubOid = 12, Access = PropertyAccess.ReadWrite)]
    [DefaultValue(-1)]
    public int AlternativeMetric4 { get; set; }

    /// <summary>
    /// Gets or sets the destination.
    /// </summary>
    [Index]
    [Property(SubOid = 1, Access = PropertyAccess.ReadWrite)]
    public IPAddress Destination { get; set; }

    /// <summary>
    /// Gets or sets the info.
    /// </summary>
    [Property(SubOid = 13, Access = PropertyAccess.ReadWrite)]
    [DefaultValue("0.0")]
    public ObjectIdentifier Info { get; set; }

    /// <summary>
    /// Gets or sets the interface.
    /// </summary>
    [Property(SubOid = 2, Access = PropertyAccess.ReadWrite)]
    public int Interface { get; set; }

    /// <summary>
    /// Gets or sets the net mask.
    /// </summary>
    [Property(SubOid = 11, Access = PropertyAccess.ReadWrite)]
    [DefaultValue("255.255.255.255")]
    public IPAddress NetMask { get; set; }

    /// <summary>
    /// Gets or sets the next hop.
    /// </summary>
    [Property(SubOid = 7, Access = PropertyAccess.ReadWrite)]
    public IPAddress NextHop { get; set; }

    /// <summary>
    /// Gets or sets the primary metric.
    /// </summary>
    [Property(SubOid = 3, Access = PropertyAccess.ReadWrite)]
    public int PrimaryMetric { get; set; }

    /// <summary>
    /// Gets or sets the protocol.
    /// </summary>
    [Property(SubOid = 9, Access = PropertyAccess.ReadWrite)]
    [DefaultValue(ProtocolType.Netmgmt)]
    public ProtocolType Protocol { get; set; }

    /// <summary>
    /// Gets or sets the type.
    /// </summary>
    [Property(SubOid = 8, Access = PropertyAccess.ReadWrite)]
    [DefaultValue(RouteType.Indirect)]
    public RouteType Type { get; set; }

    #endregion
  }
}